{include file="public/header" /}



<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>运单模板</h3>
                <h5></h5>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>
    <div class="explanation" id="explanation">
        <div class="title" id="checkZoom">
            <h4 title="{$Think.lang.sc_explanation_tip}">{$Think.lang.sc_explanation}</h4>
            <span id="explanationZoom" title="{$Think.lang.sc_explanation_close}" class="arrow"></span>
        </div>
        <ul>
            <li>平台现有运单模板列表</li>
            <li>点击设计按钮可以对运单模板布局进行设计，点击测试按钮可以对模板进行打印测试，点击编辑按钮可以对模板参数进行调整</li>
            <li>设计完成后在编辑中修改模板状态为启用后，商家就可以绑定该模板进行运单打印</li>
            <li>点击删除按钮可以删除现有模板，删除后所有使用该模板的商家将自动解除绑定，请慎重操作</li>
        </ul>
    </div>
    
    <!-- 列表 -->
    <form id="list_form" method="post">
        <table class="sc-default-table">
            <thead>
            <tr class="space">
                <th colspan="15" class="nobg">{$Think.lang.sc_list}</th>
            </tr>
            <tr class="thead">
                <th class="w12">&nbsp;</th>
                <th>模板名称</th>
                <th class="w200">物流公司</th>
                <th class="w270">运单图例</th>
                <th class="w108 align-center">上偏移量</th>
                <th class="w108 align-center">左偏移量</th>
                <th class="w96 align-center">启用</th>
                <th class="w96 align-center">是否默认</th>
                <th class="w240 align-center"><span>{$Think.lang.sc_handle}</span></th>
            </tr>
            </thead>
            <tbody id="treet1">
            {notempty name="waybill_list"}
            {foreach name="waybill_list" item="value"}
            <tr class="hover">
                <td>&nbsp;</td>
                <td>{$value.waybill_name}</td>
                <td>{$value.express_name}</td>
                <td>
                    {present name="value.waybill_image_url"}
                    <div class="waybill-img-thumb" style="display: inline-block">
                        <a data-lightbox="lightbox-image" href="{$value.waybill_image_url}">
                            <img src="{$value.waybill_image_url}" style="width: 40px">
                        </a>
                    </div>
                    {/present}
                    <div class="waybill-img-size" style="display: inline-block"><p>宽度：{$value.waybill_width}(mm)</p>
                        <p>高度：{$value.waybill_height}(mm)</p></div>
                </td>
                <td class="align-center">{$value.waybill_top}</td>
                <td class="align-center">{$value.waybill_left}</td>
                <td class="align-center yes-onoff">{$value.waybill_usable_text}</td>
                <td class="nowrap align-center">
                    {if $value.waybill_isdefault == '1'}
                    <a class="dsui-btn-view"><i class="fa"></i>默认模板</a>
                    {else}
                    <a href="{:url('Waybill/waybill_set_default',['waybill_id'=>$value.waybill_id])}" class="dsui-btn-edit"><i class="fa"></i>设为默认</a>
                    {/if}
                </td>
                <td class="nowrap align-center">
                    <a href="{:url('Waybill/waybill_design',['waybill_id'=>$value.waybill_id])}" class="dsui-btn-edit"><i class="fa"></i>设计</a>
                    <a href="{:url('Waybill/waybill_test',['waybill_id'=>$value.waybill_id])}" target="_blank" class="dsui-btn-view"><i class="fa"></i>测试</a>
                    <a href="{:url('Waybill/waybill_edit',['waybill_id'=>$value.waybill_id])}" class="dsui-btn-edit"><i class="fa"></i>{$Think.lang.sc_edit}</a>
                    <a href="javascript:scLayerConfirm('{:url('Waybill/waybill_del',['waybill_id'=>$value.waybill_id])}','{$Think.lang.sc_ensure_del}')" class="dsui-btn-del"><i class="fa"></i>{$Think.lang.sc_del}</a>
                </td>
            </tr>
            {/foreach}
            {else /}
            <tr class="no_data">
                <td colspan="16">{$Think.lang.sc_no_record}</td>
            </tr>
            {/notempty}
            </tbody>
        </table>
        {$show_page}
    </form>

    <form id="del_form" action="{:url('Waybill/waybill_del')}" method="post">
        <input type="hidden" id="del_waybill_id" name="waybill_id">
    </form>
</div>
<link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/css/lightbox.min.css">
<script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/js/lightbox.min.js"></script>
